* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

.game-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.game-stats span:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.game-controls button {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.game-controls button:active {
    transform: translateY(0);
}

.game-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.instructions {
    margin-top: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #FFD700;
}

.instructions p {
    margin: 5px 0;
    font-size: 1em;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    
    .game-controls {
        flex-wrap: wrap;
    }
    
    .game-controls button {
        font-size: 1em;
        padding: 10px 20px;
    }
}

/* 游戏状态动画 */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #FFD700;
}

.final-score {
    font-size: 1.5em;
    margin-bottom: 30px;
}